package work.MrSun.xyq.controller;

/**
 * @Author MrSun
 * @Date 2023/4/7 18:58
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import work.MrSun.xyq.model.XyqNotice;
import work.MrSun.xyq.service.XyqNoticeService;

import java.util.List;

/**
 * 获取所有的公告信息---控制层
 */
@RestController
public class GetNoticeController {
    @Autowired
    private XyqNoticeService xyqNoticeService;

    //获取所有的公告
    @PostMapping("/getMessage/getAllNoticeMessage")
    public List<XyqNotice> getAllNoticeMessage(){
        return xyqNoticeService.findAll();
    }
}
